package com.example.demo.mapper;

import com.example.demo.entity.Articleinfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @program: demo
 * @author: JCM
 * @create: 2023-08-01 10:16
 * @descrip
 */
@Mapper
public interface ArticleMapper {
    Integer getArticleCountById(@Param("uid") Integer uid);
    List<Articleinfo> getMyList(@Param("uid") Integer uid);

    int delArt(@Param("id") Integer id,@Param("uid") Integer uid);

    Articleinfo getDetail(@Param("id") Integer id);

    int incRCount(@Param("id") Integer id);

    int addArt(Articleinfo articleinfo);

    int update(Articleinfo articleinfo);

    List<Articleinfo> getListByPage(@Param("psize") Integer psize, @Param("offsize") Integer offsize);

    int getCount();
}
